/**
 * Copyright 2015 Qiyi Inc. All rights reserved.
 *
 * @file:   Statistic.Config.js
 * @path:   js-src/album/
 * @author: karkarrotxu@qiyi.com
 * @date:   2016-04-25
 */
qui(
    function (require, exports, module) {
        Statistic.Config = $.extend({}, Ancestor.Config, {
            TABLE_COLMODEL_CONFIG: {
                'addTime': {
                    name: 'addTime',
                    title: false,
                    index: 'addTime',
                    sortable: false,
                    align: 'center',
                    width: 100,
                    formatter: function (v, o, r) {
                        return Statistic.Util.formatter.addTime(v, o, r);
                    }
                },
                'programId': {
                    name: 'programId',
                    title: false,
                    index: 'programId',
                    align: 'center',
                    width: 100,
                    sortable: false
                },
                'qipuId': {
                    name: 'qipuId',
                    title: false,
                    index: 'qipuId',
                    sortable: false,
                    width: 100,
                    align: 'center'
                },
                'programName': {
                    name: 'programName',
                    title: false,
                    index: 'programName',
                    width: 230,
                    sortable: false,
                    align: 'center'
                },
                'programMinutes': {
                    name: 'programMinutes',
                    title: false,
                    index: 'programMinutes',
                    align: 'center',
                    sortable: false,
                    width: 100,
                    formatter: function (v, o, r) {
                        return Statistic.Util.formatter.programMinutes(v, o, r);
                    }
                },
                'user': {
                    name: 'user',
                    index: 'user',
                    sortable: false,
                    align: 'center',
                    width: 90
                },
                'channelName': {
                    name: 'channelName',
                    index: 'channelName',
                    sortable: false,
                    width: 130,
                    align: 'center'
                },
                'cooperativePartiner': {
                    name: 'cooperativePartiner',
                    index: 'cooperativePartiner',
                    sortable: false,
                    width: 130,
                    align: 'center'
                },
                'dotSubTime': {
                    name: 'dotSubTime',
                    index: 'dotSubTime',
                    sortable: false,
                    width: 130,
                    align: 'center'
                },
                'enterLegoTime': {
                    name: 'enterLegoTime',
                    index: 'enterLegoTime',
                    sortable: false,
                    align: 'center',
                    width: 130,
                    formatter: function (v, o, r) {
                        return Statistic.Util.formatter.enterLegoTime(v, r);
                    }
                },
                'legoProduceFinishedTime': {
                    name: 'legoProduceFinishedTime',
                    title: false,
                    index: 'legoProduceFinishedTime',
                    sortable: false,
                    align: 'center',
                    width: 100,
                    formatter: function (v, o, r) {
                        return Statistic.Util.formatter.finishedtime(v, r);
                    }
                },
                'publishTime': {
                    name: 'publishTime',
                    title: false,
                    index: 'publishTime',
                    width: 140,
                    align: 'center',
                    sortable: false
                },
                'liveBeginTime': {
                    name: 'liveBeginTime',
                    title: false,
                    index: 'liveBeginTime',
                    sortable: false,
                    align: 'center',
                    width: 130
                },
                'liveEndTime': {
                    name: 'liveEndTime',
                    title: false,
                    index: 'liveEndTime',
                    width: 140,
                    align: 'center',
                    sortable: false
                },
                ocrFlag: {
                    name: 'ocrFlag',
                    title: false,
                    index: 'ocrFlag',
                    width: 110,
                    align: 'center',
                    sortable: false,
                    formatter: function (v, o, r) {
                        return Statistic.Util.formatter.ocrFlag(v, o, r);
                    }
                },
                ocrTitleFlag: {
                    name: 'ocrTitleFlag',
                    title: false,
                    index: 'ocrTitleFlag',
                    width: 90,
                    align: 'center',
                    sortable: false,
                    formatter: function (v, o, r) {
                        return Statistic.Util.formatter.ocrTitleFlag(v, o, r);
                    }
                },

                intelligent_insert_time: {
                    name: 'intelligentInsertTime',
                    title: false,
                    index: 'intelligentInsertTime',
                    width: 130,
                    align: 'center',
                    sortable: false,
                    formatter: function (v, o, r) {
                        return Statistic.Util.formatter.intelligent_insert_time(v, o, r);
                    }
                },
                download: {
                    width: 200,
                    align: 'center',
                    sortable: false,
                    formatter: function (v, o, r) {
                        return Statistic.Util.formatter.download(v, o, r);
                    }
                },
                log_id: {
                    name: 'id',
                    index: 'id',
                    title: false,
                    sortable: false,
                    hidden: true
                },
                log_addTime: {
                    name: 'addTime',
                    index: 'addTime',
                    sortable: false,
                    title: false,
                    width: 150,
                    align: 'center'
                },
                log_user: {
                    name: 'user',
                    index: 'user',
                    sortable: false,
                    title: false,
                    width: 150
                },
                log_type: {
                    name: 'type',
                    index: 'type',
                    sortable: false,
                    title: false,
                    width: 120,
                    formatter: function (v, o, r) {
                        return Statistic.Util.formatter.log_type(v, o, r);
                    }
                },
                log_descr: {
                    name: "descr",
                    index: 'descr',
                    title: false,
                    width: 450,
                    sortable: false,
                    formatter: function (v, o, r) {
                        return Statistic.Util.formatter.log_descr(v, o, r);
                    }
                },
                dataMode: {
                    name: "dataMode",
                    index: 'dataMode',
                    width: 150,
                    align: 'center',
                    sortable: false,
                    formatter: function (v, o, r) {
                        return Statistic.Util.formatter.dataMode(v, o, r);
                    }
                }
            },

            TABLE_LIST: {
                multiselect: false,
                rowNum: 20,
                url: Statistic.urlConfig.sdGetUrl,
                colNames: ["制作日期", "节目ID", "奇谱ID", "节目原名", "节目时长(分）", "频道", "制作人员", "电视台",
                    "是否使用智能拆条","是否OCR识别", "开始打点时间",
                    "打点提交时间", "节目入乐高时间", "乐高生产状态", "直播开始时间", "直播结束时间",
                    "制作数据类型", "操作"
                ],
                colModel: ['addTime', 'programId', 'qipuId', 'programName', 'programMinutes', 'channelName', 'user', 'cooperativePartiner',
                    "ocrFlag","ocrTitleFlag", "intelligent_insert_time",
                    'dotSubTime', 'enterLegoTime', 'legoProduceFinishedTime', 'liveBeginTime', 'liveEndTime',
                    "dataMode", "download"
                ],
                prmNames: {
                    page: "pageNo",
                    rows: "pageSize"
                },
                datatype: "local",
                pager: "#pager"
            },
            TABLE_LOG: {
                url: Statistic.urlConfig.getEpisodeLogUrl,
                loadBeforeSend: function (xhr, settings) {
                    var auth = Ancestor.Util.getAuth("/vod/episodeLogList");
                    xhr.setRequestHeader('Sign', auth.sign);
                    xhr.setRequestHeader("Time", auth.clientTime);
                    xhr.setRequestHeader("From", auth.from);
                    return true;
                },
                multiselect: false,
                loadtext: '加载中...',
                loadui: 'block',
                rowNum: 40,
                width: 875,
                mtype: "post",
                datatype: "local",
                prmNames: {
                    page: "pageNo",
                    rows: "pageSize"
                },
                colNames: ["ID", "操作时间", "人员", "动作", "备注"],
                colModel: ['log_id', "log_addTime", "log_user" , "log_type" , "log_descr"],
                pager: "#log_pager"
            },

            TABLE_HIDDEN: {
                colNames: ["制作日期", "节目ID", "奇谱ID", "节目原名", "节目时长(分）", "频道", "制作人员", "电视台",
                    "是否使用智能拆条","是否OCR识别" ,"开始打点时间",
                    "打点提交时间", "节目入乐高时间", "乐高生产状态", "直播开始时间", "直播结束时间"
                ],
                colModel: ['addTime', 'programId', 'qipuId', 'programName', 'programMinutes', 'channelName', 'user', 'cooperativePartiner',
                    "ocrFlag","ocrTitleFlag", "intelligent_insert_time",
                    'dotSubTime', 'enterLegoTime', 'legoProduceFinishedTime', 'liveBeginTime', 'liveEndTime'
                ]
            },
            FINISHED_STATUS: ["未制作", "制作完成", "制作中", "制作异常", "流程被终止"],
            PUBLISH_STATUS: ["未发布", "已发布", "页面下线", "页面备用"],
            VOD_LOG_TYPE: {
                redoSubmit:109,
                sendToLego:106,
                delayWrapDataToLego:122,
                sendWrapDataToLego: 123,
                notifyWrapPublish:124,
                sendWrapDataToLego_suc: 125,
                sendWrapDataToLego_fail: 126,
                selectSendMode:127
            },
            STATISTIC_DATA_MODE:{
                original:0,  //0：纯净版,
                fragment_wrap_new:89,  // 89:新建包装版-分片,
                fragment_wrap_not_made:90,   // 90:包装覆盖未制作-分片
                fragment_wrap_made:91,    // 91：包装覆盖已制作-分片,
                wrap_new:99,  // 99:新建包装版,
                wrap_not_made:100,  // 100:包装覆盖未制作，
                wrap_made:101  // 101：包装覆盖已制作
            }
        })


    }
);